
public class ResultViewFactory
{
	public static IView createResultView(Question q, String userAnswer)
	{
		if(q instanceof MultipleChoiceQuestion)
		{
			return new MultipleChoiceResultView((MultipleChoiceQuestion)q, userAnswer);
		}
		else if(q instanceof TimeQuestion)
		{
			return new TimeResultView((TimeQuestion)q, userAnswer);
		}
		else
		{
			return null;
		}
	}
}
